﻿package bonus {
	
	import field.Ball;
	import field.Element;
	import flash.display.MovieClip;
	import field.GamePanel;
	
	
	public class Weight extends Bonus {
		
		
		public function Weight() {
			// constructor code
		}
		
		public override function apply(): void {
			main.panel.disappearBallsUnderCursor();
			
			super.apply();
		}
		
		public override function select(tileX: Number, tileY: Number): void {
			var currentElement: Element = null;
			for (var i: Number = 0; i < GamePanel.DIMENSION_HEIGHT; i++) {
				
				currentElement = main.panel.elements[i][tileX];
				
				if(currentElement != null)
					main.panel.elementsUnderCursor[currentElement] = currentElement;
			}
			
			main.panel.blinkElementsUnderCursor();
		}
		
		
	}
	
}
